<?php
namespace Admin\controller;
use Think\Controller;
class CommonController extends Controller{
    public function __construct(){
        //继承thinkphp的controller类
        parent::__construct();
        if (!isset($_SESSION['session_login'])){
            $this->error('登录',U('Login/login'),2);
        }
    }
}